import { NodeUtils } from "@/utils/flow/nodeUtils";

export default (props, type) => {
  const data = {
    2: {
      nodeId: NodeUtils.idGenerator(),
      nodeName: "路由",
      nodeType: 2,
      nodeFrom: "",
      prevId: [],
      nodeTo: [],
      childNode: null,
      error: true,
      property: null,
      conditionNodes: [
        {
          nodeId: NodeUtils.idGenerator(),
          nodeName: "条件1",
          nodeDisplayName: "条件1",
          nodeType: 3,
          nodeFrom: "",
          prevId: [],
          nodeTo: [],
          priorityLevel: 1,
          conditionList: [],
          nodeApproveList: [],
          error: true,
          isDefault: 0,
          childNode: props.childNodeP,
        },
        {
          nodeId: NodeUtils.idGenerator(),
          nodeName: "条件2",
          nodeDisplayName: "条件2",
          nodeType: 3,
          nodeFrom: "",
          prevId: [],
          nodeTo: [],
          priorityLevel: 2,
          conditionList: [],
          nodeApproveList: [],
          childNode: null,
          isDefault: 0,
          error: false,
        },
      ],
    },

    4: {
      nodeId: NodeUtils.idGenerator(),
      nodeName: "审核人",
      nodeDisplayName: "审核人",
      nodeType: 4,
      nodeFrom: "",
      prevId: [],
      nodeTo: [],
      setType: 1,
      directorLevel: 1,
      signType: 1,
      noHeaderAction: 1,
      childNode: props.childNodeP,
      error: true,
      property: null,
      nodeApproveList: [],
    },

    5: {
      nodeId: NodeUtils.idGenerator(),
      nodeName: "抄送人",
      nodeDisplayName: "抄送人",
      nodeType: 5,
      nodeFrom: "",
      prevId: [],
      nodeTo: [],
      setType: 1,
      error: true,
      ccSelfSelectFlag: 1,
      childNode: props.childNodeP,
      property: null,
      nodeApproveList: [],
    },
  };
  return data[type];
};
